﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

	/// <summary>
	/// 实体类TB_ConsultType 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class TB_ConsultType : Entity 
	{
		public TB_ConsultType():base("TB_ConsultType") {    _ID=Guid.NewGuid().ToString();}

		#region Model
		private string _ID;
		private string _TypeName;
		private int? _ConsultCount;
		private int? _Sort;
		private string _State;
		private int? _TypeTags;
		private string _CreateUser;
		private DateTime? _CreateDate;
		/// <summary>
		/// 主键
		/// </summary>
		public string ID
		{
			get{ return _ID; }
			set
			{
				this.OnPropertyValueChange(_.ID,_ID,value);
				this._ID=value;
			}
		}
		/// <summary>
		/// 名称
		/// </summary>
		public string TypeName
		{
			get{ return _TypeName; }
			set
			{
				this.OnPropertyValueChange(_.TypeName,_TypeName,value);
				this._TypeName=value;
			}
		}
		/// <summary>
		/// 数据总数
		/// </summary>
		public int? ConsultCount
		{
			get{ return _ConsultCount; }
			set
			{
				this.OnPropertyValueChange(_.ConsultCount,_ConsultCount,value);
				this._ConsultCount=value;
			}
		}
		/// <summary>
		/// 排序
		/// </summary>
		public int? Sort
		{
			get{ return _Sort; }
			set
			{
				this.OnPropertyValueChange(_.Sort,_Sort,value);
				this._Sort=value;
			}
		}
		/// <summary>
		/// 状态
		/// </summary>
		public string State
		{
			get{ return _State; }
			set
			{
				this.OnPropertyValueChange(_.State,_State,value);
				this._State=value;
			}
		}
		/// <summary>
		/// 级别标签
		/// </summary>
		public int? TypeTags
		{
			get{ return _TypeTags; }
			set
			{
				this.OnPropertyValueChange(_.TypeTags,_TypeTags,value);
				this._TypeTags=value;
			}
		}
		/// <summary>
		/// 创建人
		/// </summary>
		public string CreateUser
		{
			get{ return _CreateUser; }
			set
			{
				this.OnPropertyValueChange(_.CreateUser,_CreateUser,value);
				this._CreateUser=value;
			}
		}
		/// <summary>
		/// 创建日期
		/// </summary>
		public DateTime? CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate=value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.ID};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.ID,
				_.TypeName,
				_.ConsultCount,
				_.Sort,
				_.State,
				_.TypeTags,
				_.CreateUser,
				_.CreateDate};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				this._ID,
				this._TypeName,
				this._ConsultCount,
				this._Sort,
				this._State,
				this._TypeTags,
				this._CreateUser,
				this._CreateDate};
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(IDataReader reader)
		{
			this._ID = DataUtils.ConvertValue<string>(reader["ID"]);
			this._TypeName = DataUtils.ConvertValue<string>(reader["TypeName"]);
			this._ConsultCount = DataUtils.ConvertValue<int?>(reader["ConsultCount"]);
			this._Sort = DataUtils.ConvertValue<int?>(reader["Sort"]);
			this._State = DataUtils.ConvertValue<string>(reader["State"]);
			this._TypeTags = DataUtils.ConvertValue<int?>(reader["TypeTags"]);
			this._CreateUser = DataUtils.ConvertValue<string>(reader["CreateUser"]);
			this._CreateDate = DataUtils.ConvertValue<DateTime?>(reader["CreateDate"]);
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(DataRow row)
		{
			this._ID = DataUtils.ConvertValue<string>(row["ID"]);
			this._TypeName = DataUtils.ConvertValue<string>(row["TypeName"]);
			this._ConsultCount = DataUtils.ConvertValue<int?>(row["ConsultCount"]);
			this._Sort = DataUtils.ConvertValue<int?>(row["Sort"]);
			this._State = DataUtils.ConvertValue<string>(row["State"]);
			this._TypeTags = DataUtils.ConvertValue<int?>(row["TypeTags"]);
			this._CreateUser = DataUtils.ConvertValue<string>(row["CreateUser"]);
			this._CreateDate = DataUtils.ConvertValue<DateTime?>(row["CreateDate"]);
		}
		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","TB_ConsultType");
			/// <summary>
			/// 主键
			/// </summary>
			public readonly static Field ID = new Field("ID","TB_ConsultType","主键");
			/// <summary>
			/// 名称
			/// </summary>
			public readonly static Field TypeName = new Field("TypeName","TB_ConsultType","名称");
			/// <summary>
			/// 数据总数
			/// </summary>
			public readonly static Field ConsultCount = new Field("ConsultCount","TB_ConsultType","数据总数");
			/// <summary>
			/// 排序
			/// </summary>
			public readonly static Field Sort = new Field("Sort","TB_ConsultType","排序");
			/// <summary>
			/// 状态
			/// </summary>
			public readonly static Field State = new Field("State","TB_ConsultType","状态");
			/// <summary>
			/// 级别标签
			/// </summary>
			public readonly static Field TypeTags = new Field("TypeTags","TB_ConsultType","级别标签");
			/// <summary>
			/// 创建人
			/// </summary>
			public readonly static Field CreateUser = new Field("CreateUser","TB_ConsultType","创建人");
			/// <summary>
			/// 创建日期
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","TB_ConsultType","创建日期");
		}
		#endregion


	}
}

